import java.io.Serializable;

/**
 * Abstract class for markov states. An example of a Markov state is a word for
 * word prediction, or a character for the password cracker.
 */
public class MarkovState implements Serializable
{
	private static final long serialVersionUID = 4595398869544928612L;
	private Object token;
	
	/**
	 * Constructor for <code>MarkovState</code>
	 * @param itoken
	 */
	public MarkovState(Object itoken)
	{
		if(MarkovModel.VERBOSITY == 3)
			System.out.println("ENTER: MarkovState.MarkovState(" + itoken + ")");
		
		token = itoken;
		
		if(MarkovModel.VERBOSITY == 3)
			System.out.println("EXIT: MarkovState.MarkovState");
	}
	/**
	 * Get the token for the markov state.
	 * 
	 * @return <code>Object</code>
	 */
	public Object getToken()
	{
		if(MarkovModel.VERBOSITY == 3)
			System.out.println("ENTER: MarkovState.getToken()");
		
		if(MarkovModel.VERBOSITY == 3)
			System.out.println("EXIT: MarkovState.getToken(" + token + ")");
		return token;
	}
	
	@Override
	public String toString()
	{
		String toReturn = "MarkovState@"+this.hashCode() +
			"=(token=" + token + ")";
		return toReturn;
	}
}
